package com.xiyi.shouxin.entity.user.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.lang.Nullable;

import com.xiyi.shouxin.entity.user.UserAnswer;

public class UserAnswerMapper implements RowMapper<UserAnswer> {

    @Override
    @Nullable
    public UserAnswer mapRow(@Nullable ResultSet rs, int rowNum) throws SQLException {
        UserAnswer answer = new UserAnswer();
        if (rs == null) {
            return answer;
        }
        answer.setId(rs.getLong("id"));
        answer.setUid(rs.getLong("uid"));
        answer.setAnswer(rs.getString("answer"));
        return answer;
    }
}
